package com.one.group.service;

import com.mybatisflex.core.service.IService;
import com.one.group.model.entity.QuestionOption;

import java.util.List;

public interface QuestionOptionService extends IService<QuestionOption> {

    boolean addOption(QuestionOption option);
    boolean deleteOption(Long optionId);

    boolean deleteOptionsByQuestionId(Long questionId);

    List<QuestionOption> getOptionsByQuestionId(Long questionId);

    /**
     * 更新选项
     */
    boolean updateOption(QuestionOption option);

    /**
     * 根据问题ID对选项进行排序
     * @param questionId 问题ID
     * @return 是否更新成功
     */
    boolean batchUpdateSort(Long questionId);
}
